class CreateUsers < ActiveRecord::Migration[6.1]
  def change
    create_table :users do |t|
      t.string :email, null: false, limit: 64, default: '', comment: '邮箱'
      t.string :name, null: false, limit: 64, default: '', comment: '昵称'
      t.datetime :activated, comment: '是否活动'
      t.boolean :admin, default: false, comment: '是否管理员'
      t.timestamps null: false
      t.index [:email], unique: true
    end
  end
end
